{template 'common/header'}

<section class="content">

    <div class="w1200 m0a">
        <!-- 新增加右侧顶部三级菜单 -->
        <div class="right-titpos">
            <ul class="add-snav">
                <li class="active"><a href="#">设备编辑</a></li>
            </ul>
        </div>
        <!-- 新增加右侧顶部三级菜单结束 -->
        <form action="{php echo $this->createWebUrl('device_save')}" method="post" class="form-horizontal form" enctype="multipart/form-data">
            <input type="hidden" name="deviceInfo[id]" class="form-control" value="{$device_id}">
            <input type="hidden" name="isAdd" class="form-control" value="{$isAdd}">
            <div class="panel panel-default">
                <div class="panel-body">

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">设备名称</label>
                        <div class="col-sm-9 col-xs-12">
                            <input type="text" name="deviceInfo[device_name]" class="form-control" value="{$deviceInfo[0]['device_name']}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>设备标识KEY</label>
                        <div class="col-sm-9 col-xs-12">
                            <input type="text" name="deviceInfo[key]" class="form-control" value="{$deviceInfo[0]['key']}">
                        </div>
                    </div>


                    <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">批次</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" name="deviceInfo[batch_number]" class="form-control" value="{$deviceInfo[0]['batch_number']}">
                    </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">设备组</label>
                        <div class="col-sm-9 col-xs-12">
                            <select name="deviceInfo[device_group_id]" class="form-control">
                                <option value="0" selected=""></option>
                                <option value="1">杭州组</option>
                                <option value="2">广州组</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">地址</label>
                        <div class="col-sm-9 col-xs-12">
                            <input type="text" name="deviceInfo[address]" class="form-control" value="{$deviceInfo[0]['address']}">
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                        <div class="col-sm-9 col-xs-12">
                            <input type="hidden" name="category[parent_id]" class="form-control" value="0">
                            <input type="hidden" name="category[level]" class="form-control" value="1">

                            <input type="submit" name="submit" value="提交" class="btn btn-success">
                            <input type="button" name="back" onclick="history.back()" style="" value="返回列表" class="btn btn-default back">
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</section>

{template 'common/footer'}